﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace LostOrFind.Models;
// 登记的丢失或发现事件
public class Occasion
{
    [Key]
    public int Id
    {
        get;
        set;
    }

    public string? Description
    {
        get;
        set;
    }

    public string? Contact
    {
        get;
        set;
    }
    // 标记是丢失还是找到，true为丢失
    public bool Lost{
        get;
        set;
    }

    // 登记的用户
    [ForeignKey("User")]
    public int? UserId
    {
        get;
        set;
    }

    public User? User
    {
        get;
        set;
    }

    [ForeignKey("Status")]
    public int? StatusId
    {
        get;
        set;
    }

    public Status? Status
    {
        get;
        set;
    }

    [ForeignKey("Location")]
    public int? LocationId
    {
        get;
        set;
    }

    public Location? Location
    {
        get;
        set;
    }
    [ForeignKey("Category")]
    public int? CategoryId
    {
        get;
        set;
    }

    public Category? Category
    {
        get;
        set;
    }
    
}